<?php

    // TITLE:
    // FILE:
    // AUTHOR:
    // DATE:
    
    if ($guestLists) {
	
	echo '<h4 onclick="swap(this);">Guest Lists (' . sizeof($guestLists) . ')</h4>';
?>
<div>
<table><tbody>
    <tr>
        <th>#</th>
        <th>ID</th>
        <th>Title</th>
        <th>Sub-Event</th>
        <th>Location</th>
        <th>Guests</th>
        <th>+</th>
        <th>-</th>
        <th>?</th>
        <th>!</th>
        <th>Polls</th>
    </tr>
<?php	
        foreach ($guestLists as $i=>$guestList) {
            echo '<tr>';
            echo '<td>' . $i . '</td>';
            echo '<td>' . $guestList->getId() . '</td>';
            echo '<td><a href"' . $guestList->getId() . '">' . $guestList->getTitle() . '</a></td>';
            echo '<td><a href"' . $subEvent->getId() . '">' . $subEvent->getTitle() . '</a></td>';
            echo '<td><a href"' . $location->getId() . '">' . $location->getTitle() . '</a></td>';
            echo '<td>' . $guestList->getGuestCount() . '</td>';
            echo '<td>' . $guestList->getAttending() . '</td>';
            echo '<td>' . $guestList->getNotAttending() . '</td>';
            echo '<td>' . $guestList->getUnsure() . '</td>';
            echo '<td>' . $guestList->getUnResponded() . '</td>';
            echo '<td><a href="' . href($dir, $sub, $act, $guestList->getId()) . '">' . $guestList->getPollCount() . '</td>';
            echo '</tr>';
        }
        echo '</tbody></table>';
        
    } else {
	
	echo '<h4>There are no Guest Lists!</h4>';
	echo '<div>';

    }
    echo '</div>';
    echo '<button class="create" onclick="window.location="' . $url . '&act=edit">Add Guest List</button>';
    
?>